home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / prtcs155.zip / FREQNOTE.REX < prev    next >
OS/2 REXX Batch file  |  1994-01-14  |  1KB  |  48 lines

  1. /**/
  2. v="$VER: FreqNote Rexx Set filenote to description Williamson 56.00"
  3. outdir=GetClip("OUTDIR")||"/"
  4. parse arg indir site_address
  5. indir=addslash(indir)
  6. parse var site_address d "#" z ":" n "/" f "." p
  7.  
  8. req=z'.'n'.'f'.'p'.REQTEMP'
  9. if ~open('rf',outdir||req,'r') then exit
  10. inlist=upper(showdir(INDIR,'F'))
  11. if inlist="" then exit
  12. q=1
  13. do while ~eof('rf')
  14.     request=translate(readln('rf'),' ','09'x)
  15.     if request="" then iterate
  16.     if index(request,"!") then parse var request request.q  "!" password ';' reqdesc.q
  17.     else parse var request request.q ';' reqdesc.q
  18.     q=q+1
  19. end
  20. requests=q-1
  21. i=0
  22. do forever
  23.     i=i+1
  24.     parse var inlist infile.i inlist
  25.     if infile.i == "" then break
  26. end
  27. recd=i-1
  28. if recd=0 then exit
  29.  
  30. do i=1 to recd
  31.     do j=1 to requests
  32.         if upper(request.j)=upper(infile.i) then do
  33.             if show('p',"ROOFLOG") then Address "ROOFLOG"  'logline' left(time(),5) 'FreqNote: 'request.j':'strip(compress(reqdesc.j,'"'),'B')
  34.             address COMMAND 'FileNote' indir||request.j '"'strip(compress(reqdesc.j,'"'),'B')'"'
  35.         end
  36.     end
  37. end
  38. exit
  39.  
  40. addslash:
  41. curr=arg(1)
  42. select
  43.     when right(curr, 1) = ":" then nop
  44.     when right(curr, 1) = "/" then nop
  45.     otherwise curr = curr"/"
  46. end
  47. return(curr)
  48.